<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Performs debugging operations</title>
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-base.css" />
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-medium.css" />

 </head>
 <body class="docs"><div class="navbar navbar-fixed-top">
  <div class="navbar-inner clearfix">
    <ul class="nav" style="width: 100%">
      <li style="float: left;"><a href="mysqli.construct.html">« mysqli::__construct</a></li>
      <li style="float: right;"><a href="mysqli.dump-debug-info.html">mysqli::dump_debug_info »</a></li>
    </ul>
  </div>
</div>
<div id="breadcrumbs" class="clearfix">
  <ul class="breadcrumbs-container">
    <li><a href="index.html">PHP Manual</a></li>
    <li><a href="class.mysqli.html">MySQLi</a></li>
    <li>Performs debugging operations</li>
  </ul>
</div>
<div id="layout">
  <div id="layout-content"><div id="mysqli.debug" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">mysqli::debug</h1>
  <h1 class="refname">mysqli_debug</h1>
  <p class="verinfo">(PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">mysqli::debug</span> -- <span class="refname">mysqli_debug</span> &mdash; <span class="dc-title">Performs debugging operations</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-mysqli.debug-description">
  <h3 class="title">说明</h3>
  <p class="para">面向对象风格</p>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><strong>mysqli::debug</strong></span>(<span class="methodparam"><span class="type">string</span> <code class="parameter">$options</code></span>): <span class="type">bool</span></div>

  <p class="para rdfs-comment">过程化风格</p>
  <div class="methodsynopsis dc-description"><span class="methodname"><strong>mysqli_debug</strong></span>(<span class="methodparam"><span class="type">string</span> <code class="parameter">$options</code></span>): <span class="type">bool</span></div>

  <p class="para rdfs-comment">
   Performs debugging operations using the Fred Fish debugging library.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-mysqli.debug-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>
    
     <dt>
<code class="parameter">options</code></dt>

     <dd>

      <p class="para">
       A string representing the debugging operation to perform
      </p>
      <p class="para">
        The debug control string is a sequence of colon separated fields as follows:
        <code class="literal"><div class="cdata"><pre>&lt;field_1&gt;:&lt;field_2&gt;:&lt;field_N&gt;</pre></div></code>
        Each field consists of a mandatory flag character followed by an optional <code class="literal">,</code> and comma separated list of modifiers:
        <code class="literal">flag[,modifier,modifier,...,modifier]</code>
      </p>
      <p class="para">
       <table class="doctable table">
        <caption><strong>Recognized Flag Characters</strong></caption>
          
            <thead>
              <tr>
                <th><code class="parameter">option</code> character</th>
                <th>Description</th>
              </tr>

            </thead>

            <tbody class="tbody">
              <tr>
                <td>O</td>
                <td><strong><code>MYSQLND_DEBUG_FLUSH</code></strong></td>
              </tr>

              <tr>
                <td>A/a</td>
                <td><strong><code>MYSQLND_DEBUG_APPEND</code></strong></td>
              </tr>

              <tr>
                <td>F</td>
                <td><strong><code>MYSQLND_DEBUG_DUMP_FILE</code></strong></td>
              </tr>

              <tr>
                <td>i</td>
                <td><strong><code>MYSQLND_DEBUG_DUMP_PID</code></strong></td>
              </tr>

              <tr>
                <td>L</td>
                <td><strong><code>MYSQLND_DEBUG_DUMP_LINE</code></strong></td>
              </tr>

              <tr>
                <td>m</td>
                <td><strong><code>MYSQLND_DEBUG_TRACE_MEMORY_CALLS</code></strong></td>
              </tr>

              <tr>
                <td>n</td>
                <td><strong><code>MYSQLND_DEBUG_DUMP_LEVEL</code></strong></td>
              </tr>

              <tr>
                <td>o</td>
                <td>output to file</td>
              </tr>

              <tr>
                <td>T</td>
                <td><strong><code>MYSQLND_DEBUG_DUMP_TIME</code></strong></td>
              </tr>

              <tr>
                <td>t</td>
                <td><strong><code>MYSQLND_DEBUG_DUMP_TRACE</code></strong></td>
              </tr>

              <tr>
                <td>x</td>
                <td><strong><code>MYSQLND_DEBUG_PROFILE_CALLS</code></strong></td>
              </tr>

            </tbody>
          
        </table>

       </p>
     </dd>

    
   </dl>

  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-mysqli.debug-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   Returns <strong><code>true</code></strong>.
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-mysqli.debug-examples">
  <h3 class="title">范例</h3>
  <p class="para">
   <div class="example" id="example-1450">
    <p><strong>示例 #1 Generating a Trace File</strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br /><br /></span><span style="color: #FF8000">/*&nbsp;Create&nbsp;a&nbsp;trace&nbsp;file&nbsp;in&nbsp;'/tmp/client.trace'&nbsp;on&nbsp;the&nbsp;local&nbsp;(client)&nbsp;machine:&nbsp;*/<br /></span><span style="color: #0000BB">mysqli_debug</span><span style="color: #007700">(</span><span style="color: #DD0000">"d:t:o,/tmp/client.trace"</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</code></div>
    </div>

   </div>
  </p>
 </div>


 <div class="refsect1 notes" id="refsect1-mysqli.debug-notes">
  <h3 class="title">注释</h3>
  <blockquote class="note"><p><strong class="note">注意</strong>: 
   <p class="para">
    To use the <span class="function"><strong>mysqli_debug()</strong></span> function you must compile
    the MySQL client library to support debugging.
   </p>
  </p></blockquote>
 </div>


 <div class="refsect1 seealso" id="refsect1-mysqli.debug-seealso">
  <h3 class="title">参见</h3>
  <p class="para">
   <ul class="simplelist">
    <li class="member"><span class="function"><a href="mysqli.dump-debug-info.html" class="function" rel="rdfs-seeAlso">mysqli_dump_debug_info()</a> - 将调试信息输出到日志</span></li>
    <li class="member"><span class="function"><a href="function.mysqli-report.html" class="function" rel="rdfs-seeAlso">mysqli_report()</a> - 别名 mysqli_driver-&gt;report_mode</span></li>
   </ul>
  </p>
 </div>


</div></div></div></body></html>